<?

if ($c = stack('name')) {

	$temp = datafetch_array('gallery', FP_UPLOAD_PATH.$DATA['components'][$c]['settings']['path']);	// load existing images list
	$DATA['components'][$c]['data'] = $temp[array_rand($temp)];

	unstack();
}

?>